<template>
  <div class="header-box">
    <div class="left-header">
      <el-button @click="menuButton()" icon="el-icon-menu"  size="mini"></el-button>
      <!-- 面包屑 -->
      <span class="left-header-text">首页</span>
    </div>
    <div class="right-header">
      <el-dropdown>
        <span class="el-dropdown-link">
          <img class="user-img" src="@/assets/logo.png" alt="">
        </span>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>用户中心</el-dropdown-item>
          <el-dropdown-item>退出</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </div>
</template>
<style scoped>
.header-box {
padding: 0 20px;
  height: 60px;
  background-color: #555;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.user-img{
    width: 40px;
    height: 40px;
}
.left-header-text{
    margin-left: 10px;
}

</style>

<script>
export default {
  data() {
    return {};
  },
  methods:{
    menuButton(){
        this.$store.commit('collapseMenu')
    }
  }
};
</script>
